<template>
  <view class="account-info">
    <view class="info info-b info-r">
            <view class="tip">总收益(元)</view>
            <view class="content">{{count}}</view>
    </view>
    <view class="info info-b">
        <view class="tip">代发放(元)</view>
            <view class="content">{{examine}}</view>
    </view>
    <view class="info info-r">
        <view class="tip">本月总收益(元)</view>
            <view class="content">{{month}}</view>
    </view>
    <view class="info">
        <view class="tip">上月总收益(元)</view>
            <view class="content">{{lastMonth}}</view>
    </view>
  </view>
</template>

<script setup lang="ts">
import  type{ IGetUserIncomInfoResponse } from "@/api/model/dyUserCodeModel";
interface IProps {
    dateInfo:IGetUserIncomInfoResponse | undefined
}
const props = withDefaults(defineProps<IProps>(), {})

const count = computed(()=>{
    return props.dateInfo ? props.dateInfo.count ? (props.dateInfo.count / 100).toFixed(2) : '0.00' : '0.00'
})
const month = computed(()=>{
    return props.dateInfo ? props.dateInfo.month ? (props.dateInfo.month / 100).toFixed(2) :'0.00' : '0.00'
})
const lastMonth = computed(()=>{
    return props.dateInfo ? props.dateInfo.lastMonth ? (props.dateInfo.lastMonth / 100).toFixed(2) : '0.00' : '0.00'
})
const examine = computed(()=>{
    return props.dateInfo ? props.dateInfo.examine ? (props.dateInfo.examine / 100).toFixed(2) : '0.00' : '0.00'
})
</script>

<style lang="scss" scoped>
.account-info{
    height: 250rpx;
    background: linear-gradient(to bottom, white, rgb(250,250,254));
    border-radius: 20rpx;
    margin:20rpx 0;
    margin-top: 170rpx;
    display: flex;
    flex-wrap: wrap;
    .info{
        width: 49.7%;
        height: 50%;
        .tip{
            margin: 20rpx;
            margin-bottom: 10rpx;
            font-size: 23rpx;
            color: $uni-text-color-disable;
        }
        .content{
            margin-left: 20rpx;
            font-weight: bolder;
        }
    }
    .info-b{
        border-bottom: 1rpx solid #ececec;
    }
    .info-r{
        border-right: 1rpx solid #ececec;
    }
    
    
}

</style>
